home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / printer / pshare.zip / README.TXT < prev    next >
Text File  |  1996-07-19  |  9KB  |  192 lines

  1.  
  2. PSHARE V1 shares printers across IPX network without Novell.
  3.  
  4.  
  5. PSHARE is a print utility which provides shared use of one or more 
  6. printers across an IPX network.  It utilizes a 5k DOS TSR on each client 
  7. workstation and does not require a Novell file server or software other 
  8. than the PSHARE programs & network drivers.  The PSHARE server program 
  9. runs on a PC to which the shared printer is attached.  It queues, then 
  10. spools, print jobs sent by the clients.  An automatic upgrade option is 
  11. built in; if the client program is upgraded, the server can field the 
  12. upgrade to all users without use of any shared directories.  Printing 
  13. from Windows 3.x is supported.
  14.  
  15.  
  16. PSHARE is written in Microsoft C 6.0 & assembly and runs under DOS.  It 
  17. requires Novell IPX drivers to be loaded, but uses only IPX/SPX and 
  18. never requires any Novell file server resources or the user to be logged 
  19. in.
  20.  
  21.  
  22. Server side:  (PSS.EXE):  This collects the jobs sent by all the PSC 
  23. installations, queues & prints them.
  24.  
  25. 1.  Running PSS
  26.  
  27.     PSS requires one parameter; the name you want to assign to it.  It 
  28. is best run by your AUTOEXEC.BAT, after the network drivers are loaded.  
  29. Although PSS will work in DOS box under Windows, generally it will be 
  30. better to run it on a stand-alone PC to which the shared printers are 
  31. attached.  (Some old, funcky 286 is fine, we're using a PS/2 70).  PSS 
  32. uses only disk space for the queued files and conventional memory for 
  33. buffers.  PSS doesn't use EMS, DPMI, XMS or graphics.  By default, PSS 
  34. uses direct port I/O when printing, supplying /B on the command line 
  35. will force use of slower BIOS writes.
  36.  
  37. 2.  PSS Printer ports
  38.  
  39.     PSS will support redirection to LPT1 thru LPT3 only.  If a printer 
  40. is not attached to a port to which a job is sent, the job will just sit 
  41. there waiting for a printer ready signal.  If PSS is run in a DOS box 
  42. under Windows 3.x, you may experience character loss (by virtue of how 
  43. Windows operates the DOS box).
  44.  
  45. 3.  Job Control
  46.  
  47.     PSS offers no job control options, (ie: pausing, canceling jobs), 
  48. BUT if PSC stops sending (rebooted PC, for example), after a minute or 
  49. so, PSS will assume something happened, and will kill the job.
  50.  
  51.  
  52. Client side:  (PSC.EXE):  Run on each PC which will use the shared 
  53. printer(s).
  54.  
  55. 1.  Running PSC
  56.  
  57.     PSC requires a couple parameters to run; first the name of the PSS 
  58. instance to which it will attach, and the local LPT to remote LPT 
  59. assignments.  The client PC has LPT1 thru LPT3, as does the PSS machine.  
  60. By specifying Lx=Ry; where x represents the client PC port (L 
  61. representing Local) and y represents the server PC port (R representing 
  62. Remote), you assign local ports to remote ports.  At least one 
  63. assignment is required, but you're don't have to use LPT1 first.  Run 
  64. PSC without parameters to see the command line help.  At this time, PSC 
  65. cannot concurrently connect to printers on more than one PSS server.
  66.  
  67. 2.  General
  68.  
  69.     When PSC is run & the parameters found valid, it tries to find the 
  70. PSS instance to which it is supposed to attach, then it connects and the 
  71. PSC version is checked.  If it is old, PSS transmits a copy of the new 
  72. version to PSC, which writes it out to disk and exits with return code 
  73. 255.  If PSC is run from a batch file, the ERRORLEVEL function can test 
  74. for this, loop and re-run PSC.  The PSC version is then OK, and PSC can 
  75. proceed.  Once the version is resolved, PSC installs itself, leaving the 
  76. 5k TSR resident.  The resident portion is what redirects the printer 
  77. output.  PSC picks off data sent via INT 17h, builds buffers and 
  78. transmits them via IPX to PSS where they are spooled to a file.  PSC & 
  79. PSS use basic flow control to handle packet loss & duplication.  Once a 
  80. job has started, if there is no data sent to INT 17h for a given time 
  81. period, PSC considers the job done and commits it.  PSS then queues the 
  82. file and spools the job to the printer.  Unfortunately there is no 
  83. attractive way I know of to detect the end of print jobs at the BIOS 
  84. level, so the timeout is the mechanism.  If you start printing a new job 
  85. before the timeout expires, your new job will be added to the end of the 
  86. previous one, giving you a single bigger job.  (Might print OK, might 
  87. not).  The timeout is about 15 seconds, and is hardcoded (via #define).  
  88. Jobs can be sent concurrently via any combination of the 3 local LPT 
  89. ports, and they will not interfere with each other.
  90.  
  91.  
  92. 3.  Interaction w/ other printer redirectors
  93.  
  94.     If PSC receives INT 17h data, and is not already redirecting a 
  95. job, it calls down into the INT 17h chain to find the port status.  If a 
  96. local printer is online or a lower-level driver is redirecting that 
  97. port, a result code is returned indicating the printer is ready.  PSC 
  98. will then pass data directly down the chain without redirecting, until 
  99. the job is completed.  If drivers higher in the INT 17h chain are 
  100. redirecting, the data will never reach PSC so PSC doesn't do anything.  
  101. This way, if CAPTURE, for example, redirects a particular port, it will 
  102. override PSC until the CAPTURE is removed.  Similarly, if your local 
  103. port has an AB switch, you'll print locally when the switch is in your 
  104. position, and to the PSS printer when not.  Ports not redirected by PSC 
  105. are not affected by PSC's presence.  PSC always returns a printer ready 
  106. status when queried via INT 17h.  If PSS isn't ready for the job, or 
  107. stops receiving part way through, PSC will timeout after a while and 
  108. return a printer error via the printer status code.
  109.  
  110.  
  111. 4.  PSC under Windows 3.x
  112.  
  113.     PSC will redirect the Windows print output just as in DOS.  You 
  114. might consider enabling Print Manager so pauses in printing won't cause 
  115. the job to be prematurely committed.
  116.  
  117.  
  118. 5.  Auto-Upgrade issues
  119.  
  120.     This option is relevant if you modify PSC and want the updates 
  121. fielded to the user workstations.  Compile PSC & PSS and put both 
  122. executables on the PSS server machine, in the same directory.  Run PSS 
  123. from the directory where it is located.  Then when the users connect, 
  124. they will be automatically upgraded by PSS.  No hassle!  If you write 
  125. protect the user PC copies of PSC, the upgrade will fail, and PSC will 
  126. start anyway (the old version, of course).  PSC.EXE must exist in the 
  127. directory from which it is run for the upgrade to work.  Obviously the 
  128. autoupgrade feature could easily spread a virus if your new PSC version 
  129. on the PSS machine became infected.
  130.  
  131. 6.  Unloading PSC
  132.  
  133.     PSC can be unloaded once it is resident by running it again, 
  134. without parameters.  It will check for re-hooked interrupts, and if 
  135. there are none, it will unload itself.  When unloading, PSC will 
  136. immediately commit any jobs waiting on the job complete timeout.
  137.  
  138.  
  139.  
  140. Techie stuff:
  141.  
  142. 1.  You might experience some trouble with the TLI functions (they are a 
  143. wrapper around SPX, which PSHARE uses for the autoupgrade), particularly 
  144. in terms of opening/binding endpoints in PSS.  I'm not sure why this is, 
  145. but appears related to the size of the app's near heap (data segment - 
  146. stack)- larger near heaps cause the app to generally work better than 
  147. smaller.  The far heap size appears to not matter very much.  A while 
  148. back, Novell offered free tech support via email; I used it and they 
  149. couldn't give me any hints other than the obvious ones.
  150.  
  151. 2.  PSS uses SAP to indicate its presence on the network.  PSC does a 
  152. SAP query (not a Bindery or NDS query) to find PSS and consequently 
  153. doesn't require Novell file servers for anything.  I didn't use the 
  154. Novell SDK versions of the SAP advertising or querying functions because 
  155. I wanted to query based on server name and type, which you can't do with 
  156. the canned Novell functions.  Although I haven't tested this, you should 
  157. be able to have multiple PSS servers (with unique names).  PSC should 
  158. find the one indicated on its command line, by name.  The server type 
  159. values are hard-coded (using #define), so they can be redefined if 
  160. necessary.
  161.  
  162.  
  163. PSHARE is fully public domain, and may be distributed in any form.
  164.  
  165.  
  166. I wrote this program because my offi